//获取品牌管理的数据

//二次封闭的axios
import request from '@/utils/request'

//获取品牌列表接口
export const reqTradeMarkList = (page, limit) => request({ url: `/admin/product/baseTrademark/${page}/${limit}`, method: 'get' })

//添加或者修改品牌
export const reqAddOrUpdataTradeMark = (tradeMark) => {
    //带给服务器的数据有id时，则是修改，没有就是添加
    if (tradeMark.id) {
        return request({ url: '/admin/product/baseTrademark/update', method: 'put', data: tradeMark })
    } else {
        return request({ url: '/admin/product/baseTrademark/save', method: 'post', data: tradeMark })
    }
}

//删除品牌
export const reqDeleteTradeMark = (id) => request({ url: `/admin/product/baseTrademark/remove/${id}`, method: 'delete' })